import React, { PureComponent } from "react"
export function EnhancedProps(OriginComponent) {
    class NewComponent extends PureComponent {
        constructor() {
            super()
            this.state = {
                userInfo: {
                    name: "baki",
                    age: 18,
                },
            }
        }
        render() {
            const { userInfo } = this.state
            return <OriginComponent {...userInfo} />
        }
    }
    return NewComponent
}
